package entity;

import java.lang.System;

public class EEPLRegRegister extends ERegister {
	private String value = "";
	
	public EEPLRegRegister(String name, int address, String dataType,
			String description, String unit) {
		super(name, address, dataType, description, false, unit);
	}
	
	@Override
	public Object getValue() {
		return value;
	}

	@Override
	public void setValue(byte b0, byte b1, byte b2, byte b3) {
		String newValue  = Integer.toHexString((int)b1) + "." + Integer.toHexString((int)b0);
		
		if (!newValue.equalsIgnoreCase(this.value)) {
			this.value = newValue;
			setChanged();
			notifyObservers(value);
		}
	}
        
        @Override
        public String toString(){
            return value;     
        }
}
